//
//  SaleStaicViewController.m
//  penzer
//
//  Created by caiyc on 2018/10/4.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "SaleStaicViewController.h"

@interface SaleStaicViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *botom_ScroView;
@property (weak, nonatomic) IBOutlet UILabel *Total_chang;
@property (weak, nonatomic) IBOutlet UILabel *Total_Sale;
@property (weak, nonatomic) IBOutlet UILabel *Total_Profile;

@end

@implementation SaleStaicViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavigation:1 andTitle:@"销售数据" andNaviColor:[UIColor clearColor] andTitleColor:nil];
    self.botom_ScroView.contentSize = CGSizeMake(screen_width, screen_height*1.2);
    [self loadData];
    // Do any additional setup after loading the view from its nib.
}
-(void)loadData{
    NSDictionary *param = @{@"ac":@"member",
                            @"op":@"member",
                            @"ctrl":@"live_anchor",
                            @"ta":@"saledata"};
    [self weqPostHandle:param success:^(id response) {
        if(response){
            self.Total_chang.text = [NSString stringWithFormat:@"共直播%@场",response[@"data"][@"live_total"]];
            self.Total_Sale.text= [NSString stringWithFormat:@"%@元",response[@"data"][@"total_saleprice"]];
            self.Total_Profile.text= [NSString stringWithFormat:@"%@元",response[@"data"][@"total_price"]];
            self.fans.text =  [NSString stringWithFormat:@"%@",response[@"data"][@"total_fans"]];
            self.peoples.text =  [NSString stringWithFormat:@"%@",response[@"data"][@"total_mans"]];
            self.live_times.text =  [NSString stringWithFormat:@"%@小时",response[@"data"][@"total_live_length"]];
            self.sales.text =  [NSString stringWithFormat:@"%@",response[@"data"][@"total_goods"]];
        }
    } failure:^(NSError *error) {
        
    }];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
